<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		//var date=new Date("2020-10-1");
		//1970:格林威治时间


		/*var times=date.getTime();
		var dd=new Date(times);

		console.log(dd);*/


		/*var date=new Date();
		var result=date.setMonth(9);
		console.log(date.getMonth());*/

		var today=new Date();
		var endDay=new Date("2020/10/1");
		var result=(endDay.getTime()-today.getTime())/1000;
		console.log(endDay-today);
		console.log(endDay.toString());
		console.log(endDay.valueOf());

// 		var day=parseInt(result/(24*60*60));
// 		var hour=parseInt((result-day*24*60*60)/(60*60));
// 		var min=parseInt((result-day*24*60*60-hour*60*60)/60)
// 		var sec=parseInt(result-day*24*60*60-hour*60*60-min*60)

// console.log("距离国庆放假还有："+day+"天"+hour+"小时"+min+"分钟"+sec+"秒");

    var str="2020/10/1";
	
    var date=new Date(str)
	var result=new Date(date.getTime(str));
	
    console.log(result);
	console.log(date)
	
    // console.log(result.getDate(str))

  




	</script>






</head>
<body>
	
</body>
</html>